// wglmeshbuffer.hpp
//

#ifndef _WGLMESHBUFFER_HPP
#define _WGLMESHBUFFER_HPP

#include "wgl/wglbase.hpp"
#include "wgl/wgl_gltypes.hpp"

namespace wgl
{
  class Mesh;


  
  // MeshBuffer
  //
  class WGL_API MeshBuffer
  {
  public:
    MeshBuffer ();
    ~MeshBuffer ();

    void upload ( Mesh &mesh );
    void render ();
    
  private:
    GLuint vao{};
    GLuint vbo{};
    
    GLuint ebo{};
    GLenum polygon_type{};
    size_t n_indices{};
  };
}

#endif
